package com.dhcc.DRGsHosp.application.impl;

import java.util.List;
import java.util.Map;

import javax.inject.Named;

import org.dayatang.querychannel.JdbcTemplateObj;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;

import com.dhcc.DRGsHosp.application.CaseGlobalSearchApplication;
@Named
@Transactional
public class CaseGlobalSearchApplicationImpl implements CaseGlobalSearchApplication{
	@Autowired
	private JdbcTemplateObj jdbcTemplateObj;
	@Override
	public List<Map<String, Object>> query() {
		String sql="SELECT  MB.PMAININDEX PID,MB.P00050000 MR_NO, MB.P00060000 PNAME FROM DRGS.MR_BASEINFO MB LEFT JOIN DRGS.MR_IPINFO MIO "+
      " ON MB.PMAININDEX = MIO.PMAININDEX WHERE TO_CHAR(MIO.P00290000,'YYYY-MM-dd')='2017-01-01'";
		List<Map<String, Object>> mrList = jdbcTemplateObj.queryForList(sql);
		return mrList;
	}
	
	

}
